<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<link rel="stylesheet" type="text/css" href="template/default/content/css/style.css">
<script language="javascript" type="text/javascript" src="DatePicker/WdatePicker.js"></script>
<script charset="utf-8" src="eweb/kindeditor.js"></script>
<script type="text/javascript"> 
function show_help()
{
   mytop=(screen.availHeight-430)/2;
   myleft=(screen.availWidth-800)/2;
   window.open("admin.php?ac=view&fileurl=help&helpid=<?=$fileurl?>","","height=470,width=800,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");
}
</script>
<title>Office 515158 2011 OA办公系统</title>
</head>
<body class="bodycolor">
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="0" class="small">
  <tr>
    <td class="Big"><img src="template/default/content/images/notify_new.gif" align="absmiddle"><span class="big3"> 新建工作流程</span>&nbsp;&nbsp;&nbsp;&nbsp;
	<span style="font-size:12px;"><a href="#" onClick="show_help()" style="font-size:12px;">使用帮助文档？</a>&nbsp;|&nbsp;
	<a href="http://bbs.515158.com/" target="_blank" style="font-size:12px;">使用遇到问题？</a>&nbsp;|&nbsp;
	<a href="admin.php?ac=workadd&fileurl=<?=$fileurl?>" style="font-size:12px;">返回列表页</a><img src="template/default/content/images/f_ico.png" align="absmiddle"></span>
    </td>
  </tr>
</table>
<script Language="JavaScript"> 
function CheckForm()
{
   if(document.save.userkey.value=="")
   { alert("审批人员不能为空！");
     document.save.userkey.focus();
     return (false);
   }
   if(document.save.number.value=="")
   { alert("流水单号不能为空！");
     document.save.number.focus();
     return (false);
   }
   if(document.save.title.value=="")
   { alert("工作流名称不能为空！");
     document.save.title.focus();
     return (false);
   }
<?
global $db;
$query = $db->query("SELECT * FROM ".DB_TABLEPRE."workclass_form where type_id='".$_GET["workclasstype"]."' and template_id='".$_GET["worktemplate"]."' and type!='6' ORDER BY id Asc");
	while ($row = $db->fetch_array($query)) {
		if($row["confirmation"]=='1'){
?>

if(document.save.<?=$row["inputname"]?>.value=="")
   { alert("<?=$row["formname"]?>不能为空！");
     document.save.<?=$row["inputname"]?>.focus();
     return (false);
   }
   
<?php
	}
}
?>
   return true;
}
function sendForm()
{
   if(CheckForm())
      document.save.submit();
}
</script>
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="0" class="small">
  <tr>
    <td class="Big">
<form name="save" method="post" action="?ac=add&do=tplsave&fileurl=work">
	<input type="hidden" name="savetype" value="add" />
	<input type="hidden" name="workclasstype" value="<?=$_GET["workclasstype"]?>" />
	<input type="hidden" name="worktemplate" value="<?=$_GET["worktemplate"]?>" />
	<input type="hidden" name="title" value="流水号<?=$number?><?=$tpl['title']?>" />
  <table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="70" colspan="3" align="center"><span class="big3"><?=$tpl['title']?></span></td>
      </tr>
      <tr>
        <td width="250" height="30">姓名：<input name="number" type="text" class="BigInput" id="number" style="width: 100px;" value="<?=GET_INC_USER_NAME($_USER->id)?>" maxlength="100" /></td>
        <td width="300">部门：<?=get_work_tpl_db($tpl['workclasstype'],$tpl['id'],'_cccf')?></td>
        <td width="250">流水号：<input name="number" type="text" class="BigInput" id="number" style="width: 120px;" value="<?=$number?>" maxlength="100" /></td>
      </tr>
  </table>
	
  <table width="800" border="0" align="center" class="tablenew" style="margin-top:20px;">
    <tr>
      <td width="164" height="35" align="center" class="tdnewtop">加班日期</td>
      <td width="160" height="35" align="center" class="tdnewtop">加班时间</td>
      <td width="198" height="35" align="center" class="tdnewtop">加班时长
      （估值）</td>
      <td width="260" height="35" align="center" class="tdnewtop">加班原因</td>
    </tr>
	<? for($i=0;$i<6;$i++){?>
    <tr>
      <td width="164" height="35" class="tdnew"><?=get_work_tpl_db($tpl['workclasstype'],$tpl['id'],'_fdsafd',160,30)?></td>
      <td width="160" height="35" class="tdnew"><?=get_work_tpl_db($tpl['workclasstype'],$tpl['id'],'_43543ffdsfds',160,30)?></td>
      <td width="198" height="35" class="tdnew"><?=get_work_tpl_db($tpl['workclasstype'],$tpl['id'],'_g43fdfsd',190,30)?></td>
      <td width="260" height="35" class="tdnew"><?=get_work_tpl_db($tpl['workclasstype'],$tpl['id'],'_fdsf43243243',250,30)?></td>
    </tr>
	<?}?>
    <tr>
      <td height="35" colspan="2" align="center" class="tdnew">加班总时长（估值）</td>
      <td height="35" colspan="2" class="tdnew"><?=get_work_tpl_db($tpl['workclasstype'],$tpl['id'],'_3454fdsffdrewr')?></td>
    </tr>
  </table>

<table width="800" border="0" align="center" cellpadding="3" cellspacing="0" class="small">
  <tr>
    <td class="Big"><img src="template/default/content/images/notify_new.gif" align="absmiddle"><span class="big3"> 审批流转人员确认</span>
    </td>
  </tr>
</table>



<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="250" height="50">
		部门经理批准签字：<?php
	  $blog = $db->fetch_one_array("SELECT workuser,id FROM ".DB_TABLEPRE."workclass_flow WHERE template_id='".$_GET["worktemplate"]."' and type_id='".$_GET["workclasstype"]."' and number='2' ORDER BY id desc LIMIT 1");
	  if($blog['flowtype']=='2'){
	 	get_oa_member_public(1,"userkey",$blog["workuser"],"",120,20);
	 }else{
		get_oa_member_public(1,"userkey",$blog["workuser"],"+选择审批人员",120,20);
	 }
	 ?>
	 <?php get_sms_info_phone_box("审批人员","shownamemaster")?>
	 <input type="hidden" name="flowid" value="<?=$blog["id"]?>" />
	 <br>
	 注：流程第一步审批人员，这里选择你的下一级办理人，必需填写！ </td>
      </tr>
	  
	  
	  
  </table>




 <table class="TableBlock" style="border-top:#4686c6 solid 0px;" border="0" width="800" align="center">
    <tr align="center" class="TableControl">
      <td colspan="4" nowrap height="35">
<input type="button" value="保存" class="BigButtonBHover" onClick="sendForm();"> </td>
    </tr>
  </table>
  
  
  
</form>

 
</body>
</html>
